import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:flutter_applearnprogrom/RegisterView.dart';
import 'package:flutter_applearnprogrom/SettingsTheme.dart';

class Routesbyhander{
  static String page_a = "/";                   //需要注意
  static String page_b = "/b";

  static void configureRoutes(Router router) {
    router.define(page_a, handler: aHandler);
    router.define(page_b, handler: emptyHandler);
//    router.notFoundHandler =emptyHandler;     //空页面
  }

  static var emptyHandler = new Handler(
      handlerFunc: (BuildContext context, Map<String, List<String>> params) {
        return RegisterView();
      });

  static var aHandler = new Handler(
      handlerFunc: (BuildContext context, Map<String, List<Object>> params) {
        return SettingsTheme();
      });
}